<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>门禁设备管理</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
    <script  src="../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
    <script  src="../lib/layui/layui.js" type="text/javascript" ></script>
    <script src="../js/cdzxkacs/acsDeviceMgr.js" type="text/javascript" ></script>
    <script type="text/html" id="barOperate">
        <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="open">开门</a>
        <a class="layui-btn layui-btn-xs" lay-event="config">配置</a>
    </script>
</head>
<body class="layui-layout-body" style="background-color:white;">
<div id="uploadDiv" style="display: none">
    <form class="layui-form" lay-filter="resource_form" id="resource_form" style="margin-top:5%">
        <input style="display: none" id="id" name="id">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属小区:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" lay-filter="communityId" name="communityId" id="communityId">
                    </select>
                </div>
                <label class="layui-form-label">所属楼栋:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" lay-filter="blockId" name="blockId" id="blockId">
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属单元:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" lay-filter="unitId" name="unitId" id="unitId">
                    </select>
                </div>
                <label class="layui-form-label">设备序列号:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" name="serialNum" id="serialNum" autocomplete="off" lay-verify="required"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">MAC:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="deviceMac" id="deviceMac" autocomplete="off" lay-verify="required"/>
            </div>
            <label class="layui-form-label">设备型号:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="deviceModel" id="deviceModel" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">账号:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="account" id="account" autocomplete="off" lay-verify="required"/>
            </div>
            <label class="layui-form-label">密码:</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="password" name="password" id="password" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">外网IP:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="ipAddress" id="ipAddress" autocomplete="off" lay-verify="required"/>
            </div>
            <label class="layui-form-label">宇视序列号:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="ysSerialNum" id="ysSerialNum" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class='layui-input-block' style="margin-top: 20px;margin-left: 36%">
            <button class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交</button>
            <button class="layui-btn"  id="cancel_form">取消</button>
        </div>
    </form>
</div>
<div id="updateDiv" style="display: none">
    <form class="layui-form" style="margin-top:5%">
        <input style="display: none" id="updateId" name="id">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属小区:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" lay-filter="communityId2" name="communityId" id="communityId2">
                    </select>
                </div>
                <label class="layui-form-label">所属楼栋:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" lay-filter="blockId2" name="blockId" id="blockId2">
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属单元:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" lay-filter="unitId2" name="unitId" id="unitId2">
                    </select>
                </div>
                <label class="layui-form-label">设备别名:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" name="deviceName" id="deviceName" autocomplete="off" lay-verify="required"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">账号:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="account" id="account2" autocomplete="off" lay-verify="required"/>
            </div>
            <label class="layui-form-label">密码:</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="password" name="password" id="password2" autocomplete="off" lay-verify="required"/>
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">外网IP:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="ipAddress" id="ipAddress2" autocomplete="off" lay-verify="required"/>
            </div>
            <label class="layui-form-label">宇视序列号:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="ysSerialNum" id="ysSerialNum2" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class='layui-form-item' style="margin-top: 20px;margin-left: 36%">
            <button class="layui-btn" id="setName"  lay-submit="" lay-filter="setName">保存</button>
            <button class="layui-btn"  id="cancel_form2">取消</button>
        </div>
    </form>
</div>
<div id="configDiv" style="display: none">
    <form class="layui-form" style="margin-top:5%">
        <input style="display: none" id="configId" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label">系统时间:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="systemTime" id="systemTime" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">设备IP:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="deviceIp" id="deviceIp" autocomplete="off" lay-verify="required|ip"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">设备端口:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="port" id="devicePort" autocomplete="off" lay-verify="number"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">回复声音:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="replyVolume" id="replyVolume" autocomplete="off" lay-verify="required|number"/>
            </div>
        </div>
        <div class='layui-form-item' style="margin-top: 20px;margin-left: 35px">
            <button class="layui-btn" id="setConfig"  lay-submit="" lay-filter="setConfig">保存</button>
            <button class="layui-btn"  id="cancel_form3">取消</button>
        </div>
    </form>
</div>
<div>
    <form class="layui-form" lay-filter="serch_form">
        <div class="layui-input-inline" >
            <input id="name" class="layui-input" autocomplete="off" placeholder="请输入序列号或MAC">
        </div>
        <div class="layui-input-inline">
            <button class="layui-btn" lay-submit="" lay-filter="query_device" >查询</button>
            <button class="layui-btn" type="button" id="syncDevice" >同步设备</button>
            <button class="layui-btn"  type="button" onclick="reload()">重置</button>
            <button class="layui-btn" type="button" onclick="addDevice()">添加</button>
        </div>
    </form>
    <table id="deviceTable" lay-filter="deviceTable">
    </table>
</div>


</body>


</html>